package com.ssb.admin.constant;

/**
 * @author duaichao
 * @since 2018/9/6 09:03
 */
public enum ResponseStatus {
    OK(20000, "OK"),
    ERROR(50000, "系统内部错误"),
    FAIL_LOGIN_ERR(50001,"用户名/密码错误"),
    FAIL_LOGIN_SHOW_CAPTCHA(50002,"登录失败，请输入验证码"),
    FAIL_LOGIN_LOCK_TEMP(50003,"登录失败5次，账户锁定10分钟"),
    FAIL_LOGIN_AUTH(50004,"认证失败"),
    FAIL_LOGIN_CAPTCHA_INPUT(50005,"验证码错误"),
    FAIL_LOGIN_LOCKED(50006,"账号已锁定，联系管理员解锁"),


    FAIL_TOKEN(50008,"非法token"),
    FAIL_TICK(50012,"其他客户端登录"),
    FAIL_TOKEN_INVALID(50014,"Token已失效，自动跳转登录...");

    private final int value;
    private final String message;

    ResponseStatus(int value, String message) {
        this.value = value;
        this.message = message;
    }

    public int value() {
        return this.value;
    }

    public String getMessage() {
        return this.message;
    }

    @Override
    public String toString() {
        return Integer.toString(this.value);
    }
}
